<!DOCTYPE HTML>
<html>
<head>
<title></title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <meta name="apple-mobile-web-app-status-bar-style" content="white" />
        <meta name="apple-mobile-web-app-capable" content="yes" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" />
        <meta http-equiv="cache-control" content="no-cache">
        <style type="text/css">
			body{ background-color:#f0f0f0; padding:0px;} 
			h2{ font-size: 18px; color: #333; font-weight: 100; text-align:center;  } 
			p{ font-size:13px; color:#666; line-height:18px; margin:5px; text-indent:0em; }
			 
        </style>
</head>
<body>
	<h2>测试分享功能</h2>
	<p>引入 http://api.weixinzjit.com/ api/www/js/wx_jsapi_v_1.0.js </p>
	<p>
	/**<br />
	* 代理授权接口<br />
	* 代理授权登陆 需要传递授权成功回调地址 callback 为 urlencode 编码<br />
	* http://api.weixinzjit.com/api.php/wx/oauth?callback=url<br />
	* url = urlencode(http://api.weixinzjit.com);<br />
	* 授权成功后 会把得到的用户数据返回给 callback地址 <br />
	* 返回格式 base64_encode(json_encode(array()));<br />
	* callback页面可通过 $_POST['data'] 获取到用户数据<br />
	* $userdata = json_decode(base64_decode($_POST['data']),true);<br />
	* @return<br />
	*/<br />
	</p>
</body>
<script language="javascript" src="/wap/www/js/jquery-1.10.2.min.js"></script>
<script language="javascript" src="https://res.wx.qq.com/open/js/jweixin-1.0.0.js "></script>
<script language="javascript" src="http://api.weixinzjit.com/api/www/js/wx_jsapi_v_1.0.js"></script>
<script language="javascript">

var ShareTitle = '分享标题';
var ShareDesc = "分享内容";
var ShareUrl = 'http://api.weixinzjit.com/wap.php';
var ShareImg = 'http://images.cnitblog.com/blog/471533/201411/071511193933781.png';

var ApiList = [
	//与分享有关的接口
	'onMenuShareTimeline','onMenuShareAppMessage',
	//与声音有关的接口 
	'translateVoice', 'startRecord', 'stopRecord', 'onRecordEnd', 'playVoice', 
	'pauseVoice', 'stopVoice', 'uploadVoice', 'downloadVoice'  ] ;

var CallbackList = function(){
	wx.onMenuShareAppMessage({
		title: ShareTitle,
		desc: ShareDesc,
		link: ShareUrl,
		imgUrl: ShareImg,
		trigger: function (res) { alert('用户点击发送给朋友'); },
		success: function (res) { alert('已分享');   },
		cancel: function (res) { alert('已取消'); },
		fail: function (res) { alert(JSON.stringify(res)); }
	}); 
}

$(function(){
	ZJWX(ApiList,CallbackList,true);
});

</script>

<script language="JavaScript">
document.body.addEventListener('touchmove',function(event){ event.preventDefault(); },false);
</script>

</html>